<?php
include("../myzhuaqu.php");
$sql="SELECT `name` FROM jipu.`jipu_item_category`";
$da=query($sql);
$text="";
for($i=0;$i<count($da);$i++){
    $text.=$da[$i]['name']."|";
}
$text=preg_replace("/\,/","|",$text);
$text=preg_replace("/\"|\-|\//","",$text);
$text=preg_replace("/\|$/","",$text);

$title="75度酒精湿巾大量批发80抽独立包装一次性卫生清洁消毒湿纸巾工厂";
//$title="女士一次性纯棉皮鞋 白色花边平面四筋 免洗独立包装 EO灭菌";
preg_match_all("/(".$text.")/",$title,$nn);
$matchs=array_unique($nn[1]);
$name=current($matchs);
$data=query("select * from jipu.jipu_item_category where name='{$name}'");
$trees=preg_replace("/^\,|\,$/","",$data[0]["trees"]);
return $trees;